package com.linghu.study.springbootshirojwtdemo.service.Impl;

import com.linghu.study.springbootshirojwtdemo.bean.LogData;
import com.linghu.study.springbootshirojwtdemo.bean.Record;
import com.linghu.study.springbootshirojwtdemo.mapper.LogtestMapper;
import com.linghu.study.springbootshirojwtdemo.service.LogtestService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class LogtestServiceImpl implements LogtestService {

    @Resource
    LogtestMapper logtestMapper;

    //日志信息的插入实现
    @Async//异步调用添加日志访客的方法
    @Override
    public void insertLog(LogData logData) {
        int i = logtestMapper.insert(logData);
        System.out.println(i>0?"日志插入成功":"日志插入失败");
    }
}
